#include "polymorphic.hpp"

using namespace learn::polymorphic;

Derive3::Derive3()
{
    cout<<"Derive3 called"<<endl;
}

Derive3::~Derive3()
{
    cout<<"~Derive3 called"<<endl;
}

void learn::polymorphic::polyTest(void)
{
    auto p = make_shared<Derive3>();
    int a = 3;
    cout<<typeid(p).name()<<endl;
    shared_ptr<Base> q = p;
    p->pureService(a);
    q->pureService(a);
    cout<<"----------------------"<<endl;
}